<div>
	<h2 style="float: left;">Money Needs<?php addPost('money'); ?></h2>
	<div id="onlinedonation" style="float: right;">
	<?php
	if($posts['is501c3']==1){
		$taxexempt = '<span class="green">tax-deductible</span>.';
	}else{
		$taxexempt = '<span class="red">not tax-deductible</span>.';
	}
	//echo '<div style="margin: 7px 0px 0px 0px; font-size: 12pt; font-weight: bold;">Donations to '.$site['name'].' are '.$taxexempt.'</div>';
	?>
	</div>
	<div class="clear"></div>
</div>
<div class="posts" id="posts">
<?php 
$siteid = $site['id'];
$postsqry = dbSelect('posts',array("site_id=$siteid","parent_id=0","type_id=6"),"ORDER BY publishdate DESC");
$postcnt = 0;
if(mysql_numrows($postsqry) > 0){ 
	while($posts = mysql_fetch_array($postsqry)){
		$userid = $posts['author_id'];
		$author = mysql_fetch_array(dbSelect('users',array("id=$userid")));
		$authorname = $author['firstname'].' '.$author['lastname'];
		$nicetime = nicetime($posts['publishdate']);
?>
	<div class="post">
		<div class="post_title"><?php echo $posts['title']; ?>&nbsp;-&nbsp;<?php if($posts['cost']){echo '$'.$posts['cost'];} ?></div>
			<span class="post_author"><?php echo $authorname; ?></span>&nbsp;
			<span class="post_body"><?php echo urldecode($posts['post']); ?></span>
			<div class="post_datetime"><?php if($nicetime){echo $nicetime;} ?></div>
			<br />
		<div class="post_body">
		<?php if($posts['need_answereddate'] =="0000-00-00"){ ?>
			
			<?php if($site['paypal_email']==""){ ?>
				<div class="comments">
					<?php if($posts['contactname']){echo '<strong>Contact: </strong>'.urldecode($posts['contactname']).'';} ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<?php if($posts['contactphone']){echo '<strong>Phone: </strong>'.urldecode($posts['contactphone']).'';} ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<?php if($posts['contactemail']){echo '<strong>Email: </strong><a href="mailto:'.urlencode($posts['contactemail']).'">'.urldecode($posts['contactemail'].'</a>').'';} ?>
				</div>
				<?php }else{ ?>
				<span class="fakelinktiny" onclick="document.paypalsite.item_name.value='<?php echo 'outword.org/'.$site['name'].': '.$posts['title']; ?>'; document.paypalsite.submit();" style="cursor: pointer;">Donate via PayPal</span>
					<!---<img src="<?php echo $o['images'].'paypal-donate.png'; ?>" onclick="document.paypalsite.item_name.value='<?php echo 'outword.org/'.$site['name'].': '.$posts['title']; ?>'; document.paypalsite.submit();" style="cursor: pointer;" />--->
				<?php } ?>
			
		<?php }else{ ?>
			<br />
			<div class="comments">
			<h2><small>The Answer</small></h2>
				<div class="comment">
					<span class="comments_body "><?php echo urldecode($posts['need_answer']); ?></span>
					<div class="comments_datetime"><?php echo nicetime($posts['need_answereddate']); ?></div>
				</div>
			</div>
		<?php } ?>	
		</div>
		<?php editDel($posts['id'],$posts['author_id'],'money'); ?>
	</div><!--/post-->
<?php
$postcnt++;
	} /* /while posts */
} /* /if posts */
?>
</div><!--/posts-->